package com.jk.smartelderlycare.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jk.smartelderlycare.dto.SysSign;
import org.apache.ibatis.annotations.Update;

public interface SysSignMapper extends BaseMapper<SysSign> {
    /** 
     * @description: 后端分页查询
     * @param: [sysSign, page]
     * @return: com.baomidou.mybatisplus.core.metadata.IPage<com.jk.smartelderlycare.dto.SysSign>
     * @author hhk
     * @date: 2024/11/15 15:31
     */ 
    IPage<SysSign> findSysSignPaginationList(SysSign sysSign, Page<SysSign> page);
    /**
     * @description: 通过
     * @param: [signId]
     * @return: void
     * @author hhk
     * @date: 2024/11/15 15:35
     */
    @Update("update sys_sign set status = '审核通过' where sign_id = #{signId}")
    void updateStatusById(Long signId);
    /**
     * @description: 不通过
     * @param: [signId]
     * @return: void
     * @author hhk
     * @date: 2024/11/15 15:36
     */
    @Update("update sys_sign set status = '审核未通过' where sign_id = #{signId}")
    void alStatusById(Long signId);
    /**
     * @description: 修改时间
     * @param: [signId]
     * @return: void
     * @author hhk
     * @date: 2024/11/15 15:50
     */
    @Update("update sys_sign set sign_time = now() where sign_id = #{signId}")
    void updateSignDateById(Long signId);
}